The passive peak detector of the preceding chapter is limited by three properties of its components. The diode forward voltage $V_F$ sets a lower bound on the smallest input that can produce an output. The source impedance in series with the diode limits the rate at which the storage capacitor charges to a new peak. Any finite load impedance at the output discharges the capacitor between successive peaks. This chapter shows that enclosing the diode and the storage capacitor within the feedback path of an operational amplifier removes all three limitations. The development proceeds in four stages: the precision half-wave rectifier; the precision peak detector; a comparison of passive and active detectors on a common input; and application to the seizure-detection case study introduced earlier in the week.
The active counterpart of the diode rectifier places the diode inside the feedback path of an operational amplifier. The input drives the non-inverting terminal; the op-amp output drives the anode of the diode; the cathode forms the output node; and feedback returns from the output node to the inverting terminal. The resulting circuit is the precision half-wave rectifier, or super diode.
For a positive input, the op-amp adjusts its output until $V_\mathrm{out} = V_\mathrm{in}$. The op-amp output therefore settles at $V_\mathrm{in} + V_F$, and the diode forward voltage is supplied by the loop rather than subtracted from the signal. Referred to the output, the residual error is $V_F / A_\mathrm{OL}$, where $A_\mathrm{OL}$ is the open-loop gain. For a typical op-amp this error is of order microvolts. For a negative input, the op-amp saturates at its negative supply rail, the diode is reverse biased, and the output is zero.
Figure 1.2 compares the two rectifiers on a common sinusoidal input. The passive output is offset below the input by $V_F$ and remains at zero for any input not exceeding $V_F$. The precision output reproduces the positive half-cycle of the input from zero, independent of amplitude.
The precision peak detector comprises four functional blocks. The super diode of Section 01, formed by $A_1$ and $D_1$, drives a storage capacitor $C$ at its output node. A unity-gain buffer $A_2$ presents the capacitor voltage to the load. An n-channel MOSFET $M_\mathrm{rst}$ in parallel with $C$ provides a controlled discharge path. Outer feedback returns from the buffer output to the inverting input of $A_1$, enclosing the entire signal chain within a single feedback loop.
Operation reduces to three modes, selected by the relative values of the input $V_\mathrm{in}$, the capacitor voltage $V_C$, and the reset gate signal $\phi_\mathrm{rst}$.
When the input exceeds the held voltage, $A_1$ drives $D_1$ into conduction and the capacitor charges. The outer feedback loop forces $V_C$ to track $V_\mathrm{in}$; both the diode forward voltage $V_F$ and the buffer offset are divided by the open-loop gain rather than subtracted from the signal. The acquisition rate is set by the maximum source current of $A_1$ and by $C$: $\mathrm{d}V_C / \mathrm{d}t \approx I_\mathrm{src} / C$.
When the input falls below the held voltage, the output of $A_1$ saturates at its negative supply rail and $D_1$ becomes reverse biased. The capacitor is isolated from the source. The buffer $A_2$ presents $V_C$ to the load through a high input impedance, so negligible discharge current flows and $V_C$ remains constant over the measurement window.
When the gate signal is asserted, $M_\mathrm{rst}$ enters the triode region and discharges the capacitor through its on-resistance $R_\mathrm{on}$. A short reset pulse applied before each acquisition window returns $V_C$ to zero, so the value reported during the window is the maximum of $V_\mathrm{in}$ within that window alone.
The test waveform combines three features common in biopotential measurement: a slow baseline drift; a sequence of small spikes with amplitude comparable to the diode forward voltage; and a subsequent sequence of larger spikes whose envelope rises and then decays. The same waveform is processed by the diode-capacitor detector, the RC envelope detector, and the precision peak detector with periodic reset. The three outputs are overlaid for direct comparison.
This circuit transfers charge to the storage capacitor only when the input exceeds $V_F$, so the small-spike interval is not registered. After the first large spike, the capacitor holds the all-time maximum and the output cannot follow the subsequent decay.
This circuit retains the diode threshold $V_F$ and adds a trade-off between ripple and envelope lag. With $\tau$ short enough to follow the falling envelope, the output ripples at the carrier frequency. With $\tau$ long enough to suppress the ripple, the output lags the envelope. Spikes below $V_F$ remain undetected.
The active detector reports, for each reset window, the largest value attained by $V_\mathrm{in}$ within that window. Because the diode is enclosed in the feedback loop, the small early spikes are captured. Because the storage capacitor is buffered from the load, the held value does not droop during a window.
The case study introduced earlier in Week 10 specified a circuit chain that must detect, measure, and track a recurring spike in the low-pass filtered electroencephalogram of a seizure-clinic patient. The clinically relevant feature is the rising envelope of the spikes in the seconds preceding a seizure, because this envelope is the predictive signature reported by clinicians.
The amplitude branch proposed in the case study consisted of a passive peak detector, $D + C \parallel R_\mathrm{leak}$. Three failure modes of this circuit are pertinent to the recorded signal:
The precision peak detector developed in the preceding sections substitutes for the passive block one-for-one and removes all three failure modes. The diode sits within the op-amp feedback loop, so a millivolt-scale early spike charges the storage capacitor without the $V_F$ floor. The unity-gain buffer behind the storage capacitor isolates it from the downstream load, so the held value remains constant within a measurement window. The reset MOSFET across the storage capacitor clears the stored charge between windows, so each new spike is acquired from zero rather than masked by its predecessor.
The output reported to the clinician is therefore a step staircase: each window holds the maximum of $V_\mathrm{in}$ within it, and the sequence of held values reproduces the rising amplitude envelope specified in the brief. Spike counting is performed in parallel by the Schmitt-trigger and monostable branch; the precision detector replaces only the amplitude branch.